package com.cy.service;

import com.cy.bean.*;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface UserService {
    public User doLogin(@Param("uopid") String uopid);

    //智能匹配
    public List<Userbasicmessage> selectUser(@Param("uid") int uid,@Param("usex") String usex, @Param("uage") int uage, @Param("uprovince") String uprovince);
    //查询已关注用户
    public List<Userbasicmessage> followUser(@Param("uid") int uid,@Param("usex") String usex, @Param("uage") int uage, @Param("uprovince") String uprovince);
    //查找单个用户
    public Userbasicmessage selecUserba(@Param("uid") int uid);

    //注册
    public int addUser(User user);

    //    根据uid查询用户对应的择偶条件
    public Userloverrequest selectUserLove(@Param("uid") int uid);

    //    根据uid查询用户对应基本资料
    public Userdetailmessage selectUserDetail(@Param("uid") int uid);

    //  修改关注
    public int updateFollow(@Param("uid") int uid,@Param("friendid") int friendid,@Param("pid") int pid);

    //重置密码
    public int updatePwd(User tbluser);

    //发布动态
    public int addDynamic(Dynamic dynamic);
    //    查询发布的动态
    public List<Dynamic> selectDynamic();

    // 对动态进行评论
    public int addcomment(Comment comment);

    // 查询对应的对象聊天记录
    public List<Chat> selectChat(Chat chat);

    //发发送消息
    public int sendmessage(Chat chat);

    // 查询关注对象列表
    public List<User> selectConcern(User user);

    //磊
    //插入基本信息表
    public int insertBasicMsg(Userbasicmessage userbasicmessage);

    //插入详细信息表
    public int insertDetailMsg(Userdetailmessage userdetailmessage);

    //插入择偶信息表
    public int insertLoverReq(Userloverrequest userloverrequest);

    //查看用户基本资料
    public Userbasicmessage selectBasicMsg(int uid);

    //查看用户的详细资料
    public Userdetailmessage selectDetailMsg(int uid);

    //查看用户的择偶要求
    public Userloverrequest selectLoverReq(int uid);

    //查看用户是否填过基本信息表
    public Userbasicmessage checkBasicMsg(int uid);

    //查看用户是否填过基本信息表
    public Userdetailmessage checkDetailMsg(int uid);

    //查看用户是否填过择偶表
    public Userloverrequest checkLoverReq(int uid);

    //修改基本信息表
    public int uptBasicMsg(Userbasicmessage userbasicmessage);

    //修改详细信息表
    public int uptDetailMsg(Userdetailmessage userdetailmessage);

    //修改择偶信息表
    public int uptLoverReq(Userloverrequest userloverrequest);

    //插入自我评价
    public int insertEducate(Userhobby userhobby);

    //修改自我评价
    public int uptEducate(Userhobby userhobby);

    //查看自我评价
    public Userhobby selectEducate(int uid);


}
